
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mytools;

import com.opensymphony.xwork2.ActionSupport;
import java.util.*;

/**

 *

 * @author xiaoxiao

 */
public class allquestion extends ActionSupport {

    private int pagenumber;
    private int pagesize;
    private int totalpage;
    private List<question> allquestion;
    private String subject;
    private String chapter;
    private String type;
    private String level;
    private int num;

    public allquestion() {
    }

    public String execute() throws Exception {
        questionDAO qd = new questionDAO();
        setNum(qd.getsctlquestionAmount(subject, chapter, type, level));
        allquestion = qd.getsctlquestionlist(pagenumber, pagesize, subject, chapter, type, level);
        return SUCCESS;


    }

    /**
     * @return the pagenumber
     */
    public int getPagenumber() {
        return pagenumber;
    }

    /**
     * @param pagenumber the pagenumber to set
     */
    public void setPagenumber(int pagenumber) {
        this.pagenumber = pagenumber;
    }

    /**
     * @return the pagesize
     */
    public int getPagesize() {
        return pagesize;
    }

    /**
     * @param pagesize the pagesize to set
     */
    public void setPagesize(int pagesize) {
        this.pagesize = pagesize;
    }

    /**
     * @return the totalpage
     */
    public int getTotalpage() {
        return totalpage;
    }

    /**
     * @param totalpage the totalpage to set
     */
    public void setTotalpage(int totalpage) {
        this.totalpage = totalpage;
    }

    /**
     * @return the allquestion
     */
    public List<question> getAllquestion() {
        return allquestion;
    }

    /**
     * @param allquestion the allquestion to set
     */
    public void setAllquestion(List<question> allquestion) {
        this.allquestion = allquestion;
    }

    /**
     * @return the subject
     */
    public String getSubject() {
        return subject;
    }

    /**
     * @param subject the subject to set
     */
    public void setSubject(String subject) {
        this.subject = subject;
    }

    /**
     * @return the chapter
     */
    public String getChapter() {
        return chapter;
    }

    /**
     * @param chapter the chapter to set
     */
    public void setChapter(String chapter) {
        this.chapter = chapter;
    }

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @return the level
     */
    public String getLevel() {
        return level;
    }

    /**
     * @param level the level to set
     */
    public void setLevel(String level) {
        this.level = level;
    }

    /**
     * @return the num
     */
    public int getNum() {
        return num;
    }

    /**
     * @param num the num to set
     */
    public void setNum(int num) {
        this.num = num;
    }
}
